
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2001;
ll a[N], b[N];
map<double, ll> mp;
map<pair<double, ll>, ll> vis;
signed main() {
  int n;
  cin >> n;
  ll ans = 0, p = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    for (int j = 1; j < i; j++) {
      double x;
      if (b[i] == b[j])
        x = 1000000000;
      else
        x = ((double)a[i] - a[j]) / ((double)b[i] - b[j]);
      ans += mp[x];
      mp[x]++;
      int len = (a[i] - a[j]) * (a[i] - a[j]) + (b[i] - b[j]) * (b[i] - b[j]);
      p += vis[{x, len}];
      vis[{x, len}]++;
    }
  }
  // ans -> 梯形的个数，其中矩形会被计算2次
  // p -> 矩形的个数*2
  cout << ans - p / 2;
  return 0;
}